// 该文件专门用于创建整个应用的路由器
import VueRouter from "vue-router";
import AboutPage from "@/pages/AboutPage.vue";
import HomePage from "@/pages/HomePage.vue";
import HomeNews from "@/pages/HomeNews.vue";
import HomeMessage from "@/pages/HomeMessage.vue";

// 创建并暴露一个路由器
export default new VueRouter({
    routes:[
        {
            path:'/about',
            component:AboutPage
        },
        {
            path:'/home',
            component:HomePage,
            children:[
                {
                    path:'news',
                    component:HomeNews,
                },
                {
                    path:'message',
                    component:HomeMessage,
                }
            ]
        },
    ]
})